home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 049a / btd_301.zip / BTD1.BAT < prev    next >
DOS Batch File  |  1991-11-16  |  4KB  |  220 lines

  1. echo off
  2. cls
  3. :    *******************************************************
  4. :    This batch file handles both EXIT modes traps every BTD
  5. :      errorlevel exit, but does nothing with most of them
  6. :                      this is up to you...
  7. :    *******************************************************
  8.  
  9. : Start up your FOSSIL
  10.  
  11. btf1m -m-
  12.  
  13.  
  14. : Start up BTD with your configuration file
  15.  
  16. :loop
  17. btd btd.cfg
  18. echo .
  19.  
  20.  
  21. : Check all returned errorlevels
  22.  
  23. : This from Maximus
  24. if errorlevel = 255 goto maxerr
  25.  
  26. : These are ours -general
  27. if errorlevel = 254 goto syntaxerr
  28. if errorlevel = 253 goto noconfig
  29. if errorlevel = 252 goto nofossil
  30. if errorlevel = 251 goto badmodem
  31. if errorlevel = 250 goto sysopexit
  32. if errorlevel = 249 goto badstats
  33. if errorlevel = 248 goto spawnerr
  34. if errorlevel = 246 goto memfail
  35. if errorlevel = 240 goto midnight
  36.  
  37. : Trap user exit levels
  38. if errorlevel = 30 goto userexit
  39.  
  40. : These are ours - exit mode specific
  41. if errorlevel = 29 goto bunknown
  42. if errorlevel = 28 goto b38400
  43. if errorlevel = 27 goto b19200
  44. if errorlevel = 26 goto b9600
  45. if errorlevel = 25 goto b4800
  46. if errorlevel = 24 goto b2400
  47. if errorlevel = 23 goto b1200
  48. if errorlevel = 22 goto b600
  49. if errorlevel = 21 goto b300
  50. if errorlevel = 20 goto b7200
  51. if errorlevel = 19 goto b1275
  52. if errorlevel = 18 goto bbslocal
  53.  
  54. : These are from Maximus
  55. if errorlevel = 16 goto stackerr
  56. if errorlevel = 12 goto echonet
  57. if errorlevel = 11 goto netmail
  58. if errorlevel =  5 goto notechonet
  59. if errorlevel =  4 goto maxerr3
  60. if errorlevel =  3 goto maxerr2
  61. if errorlevel =  2 goto callergone
  62. if errorlevel =  1 goto maxerr1
  63.  
  64. echo ALL OKAY...
  65. goto loop
  66.  
  67. :maxerr
  68. echo Max: MAXIMUS error
  69. goto exit
  70.  
  71. :syntaxerr
  72. echo BTD: Syntax error
  73. goto exit
  74.  
  75. :noconfig
  76. echo BTD: No config file specified
  77. goto exit
  78.  
  79. :nofossil
  80. echo BTD: No FOSSIL installed
  81. goto exit
  82.  
  83. :badmodem
  84. echo BTD: Problem with modem
  85. goto exit
  86.  
  87. :sysopexit
  88. echo BTD: BTD terminated by Sysop
  89. goto exit
  90.  
  91. :badstats
  92. echo BTD: Problem with statistics file
  93. goto exit
  94.  
  95. :midnight
  96. echo BTD: Midnight rollover
  97. goto loop
  98.  
  99. :memfail
  100. echo BTD: DOS memory failure
  101. goto exit
  102.  
  103. :spawnerr
  104. echo BTD: DOS spawn error
  105. goto exit
  106.  
  107. :userexit
  108. echo BTD: User event exit (30-239)
  109. : THIS IS UP TO YOU !!
  110. goto loop
  111.  
  112. :bbslocal
  113. echo BTD: local logon
  114. max -k -n1 -lMAX.LOG
  115. goto maxcheck
  116.  
  117. :bunknown
  118. echo BTD: Unknown remote logon speed
  119. : THIS IS UP TO YOU !!
  120. goto maxcheck
  121.  
  122. :b38400
  123. echo BTD: Remote logon at 38400
  124. max -b38400 -n1 -p1 -lMAX.LOG
  125. goto maxcheck
  126.  
  127. :b19200
  128. echo BTD: Remote logon at 19200
  129. max -b19200 -n1 -p1 -lMAX.LOG
  130. goto maxcheck
  131.  
  132. :b9600
  133. echo BTD: Remote logon at 9600
  134. max -b9600 -n1 -p1 -lMAX.LOG
  135. goto maxcheck
  136.  
  137. :b7200
  138. echo BTD: Remote logon at 7200
  139. max -b7200 -n1 -p1 -lMAX.LOG
  140. goto maxcheck
  141.  
  142. :b4800
  143. echo BTD: Remote logon at 4800
  144. max -b4800 -n1 -p1 -lMAX.LOG
  145. goto maxcheck
  146.  
  147. :b2400
  148. echo BTD: Remote logon at 2400
  149. max -b2400 -n1 -p1 -lMAX.LOG
  150. goto maxcheck
  151.  
  152. :b1275
  153. echo BTD: Remote logon at 1275
  154. max -b1275 -n1 -p1 -lMAX.LOG
  155. goto maxcheck
  156.  
  157. :b1200
  158. echo BTD: Remote logon at 1200
  159. max -b1200 -n1 -p1 -lMAX.LOG
  160. goto maxcheck
  161.  
  162. :b600
  163. echo BTD: Remote logon at 600
  164. max -b600 -n1 -p1 -lMAX.LOG
  165. goto maxcheck
  166.  
  167. :b300
  168. echo BTD: Remote logon at 300
  169. max -b300 -n1 -p1 -lMAX.LOG
  170.  
  171. :maxcheck
  172. if errorlevel = 254 goto syntaxerr
  173. if errorlevel = 16 goto stackerr
  174. if errorlevel = 12 goto echonet
  175. if errorlevel = 11 goto netmail
  176. if errorlevel =  5 goto notechonet
  177. if errorlevel =  4 goto maxerr3
  178. if errorlevel =  3 goto maxerr2
  179. if errorlevel =  2 goto callergone
  180. if errorlevel =  1 goto maxerr1
  181. goto loop
  182.  
  183. :stackerr
  184. echo Max: internal stack error
  185. goto exit
  186.  
  187. :echonet
  188. echo Max: Echo/Net Mail entered
  189. : THIS IS UP TO YOU !!
  190. goto loop
  191.  
  192. :netmail
  193. echo Max: Net Mail entered
  194. : THIS IS UP TO YOU !!
  195. goto loop
  196.  
  197. :notechonet
  198. echo Max: No Echo/Net Mail entered
  199. : THIS IS UP TO YOU !!
  200. goto loop
  201.  
  202. :maxerr3
  203. echo Max: Error Condition 3
  204. goto exit
  205.  
  206. :maxerr2
  207. echo Max: Error Condition 2
  208. goto exit
  209.  
  210. :callergone
  211. echo Max: Caller vanished during log-on
  212. goto loop
  213.  
  214. :maxerr1
  215. echo Max: Error condition 1
  216.  
  217.  
  218. :exit
  219. btf1m -u
  220.